package cn.yhp.mybatis.session.defaults;

import cn.yhp.mybatis.session.Configuration;
import cn.yhp.mybatis.session.SqlSession;
import cn.yhp.mybatis.session.SqlSessionFactory;

/**
 * @author yhp
 * @description 默认SqlSessionFactory实现
 * @date 2023/11/8
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {

//    private final MapperRegistry mapperRegistry;

    private final Configuration configuration;


    public DefaultSqlSessionFactory(Configuration configuration){
        this.configuration=configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }

}
